{% extends 'base_user.html' %}
{% block right %}
		<div class="right_content clearfix">
				<h3 class="common_title2">全部订单</h3>
                {% for order in order_info %}
				<ul class="order_list_th w978 clearfix">
					<li class="col01">{{ order.create_time}}</li>
					<li>订单号：{{ order.order_id }}</li>
					<li class="stress">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ order.order_status_real }}</li>
				</ul>

				<table class="order_list_table w980">
					<tbody>

                        <tr>
							<td width="55%">
                                 {% for goods in order.ordergoods_set.all %}
								<ul class="order_goods_list clearfix">					
									<li class="col01"><img src="{{ goods.sku.image.url }}"></li>
									<li class="col02">{{ goods.sku.name }}<em>{{ goods.sku.price }}元/{{ goods.sku.unite }}</em></li>
									<li class="col03">{{ goods.count }}</li>
									<li class="col04">{{ goods.price }}元</li>
								</ul>
                                      {% endfor %}
							</td>

                            <form method="post" action="{% url 'order:orderpay' %}">
                                {% csrf_token %}
                                <input type="text" name="order_id" value="{{ order.order_id }}" style="display: none">
{#                                <input type="submit" value="去付款">#}
							<td width="15%"><input type="submit" value="去付款"></td>
                            </form>
						</tr>

					</tbody>
				</table>
				{% endfor %}
{#				<ul class="order_list_th w978 clearfix">#}
{#					<li class="col01">2016-8-21 17:36:24</li>#}
{#					<li class="col02">订单号：56872934</li>#}
{#					<li class="col02 stress">已支付</li>			#}
{#				</ul>#}
{#				<table class="order_list_table w980">#}
{#					<tbody>#}
{#						<tr>#}
{#							<td width="55%">#}
{#								<ul class="order_goods_list clearfix">					#}
{#									<li class="col01"><img src="../static/images/goods02.jpg"></li>#}
{#									<li class="col02">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>	#}
{#									<li class="col03">1</li>#}
{#									<li class="col04">11.80元</li>	#}
{#								</ul>#}
{#								<ul class="order_goods_list clearfix">					#}
{#									<li class="col01"><img src="../static/images/goods02.jpg"></li>#}
{#									<li class="col02">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>	#}
{#									<li class="col03">1</li>#}
{#									<li class="col04">11.80元</li>	#}
{#								</ul>#}
{#							</td>#}
{#							<td width="15%">33.60元</td>#}
{#							<td width="15%">已付款</td>#}
{#							<td width="15%"><a href="#" class="oper_btn">查看物流</a></td>#}
{#						</tr>#}
{#					</tbody>#}
{#				</table>#}

				<div class="pagenation">
                    {% if order_info.has_previous %}
					<a href="{% url 'user:order' order_info.previous_page_number %}">上一页</a>
                    {% endif %}
                    {% for page in order_info.paginator.page_range %}
                        {% if page == order_info.number %}
                        <a href="{% url 'user:order' page %}" class="active">{{ page }}</a>
                        {% else %}
                        <a href="{% url 'user:order' page %}" >{{ page }}</a>
                        {% endif %}
                    {% endfor %}
{#					<a href="#">2</a>#}
{#					<a href="#">3</a>#}
{#					<a href="#">4</a>#}
{#					<a href="#">5</a>#}
                    {% if order_info.has_next %}
					<a href="{% url 'user:order' order_info.next_page_number %}">下一页</a>
                    {% endif %}
				</div>
		</div>
{% endblock right %}
